Repository navigation
Conversation
- Run every player query in a fresh in-memory SQLite DB with a read-only authorizer, a 2s time limit and a 500-row cap - Surface real SQL errors to players (escaped) instead of silently returning no rows; give specific messages for rejected queries - Allow WITH/CTE queries, SQL comments and keywords inside string literals - Make verification answers case-insensitive - Remove dead timer code and unused tuple-result code paths - Drop Heroku Procfile/setup.sh and the duplicate requirements file; stop disabling XSRF protection in Streamlit config - Add pytest suite (sandbox, validation, stage rules, full UI playthrough via AppTest) and a GitHub Actions workflow for ruff + pytest on 3.10-3.13 - Rewrite README with live link, sandbox design and dev instructions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WwKFojwA2s9TbXcrR6Mzqg
…ning Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WwKFojwA2s9TbXcrR6Mzqg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by P · project thread
What this does
Brings SQLBomb up to production grade without changing the game itself (same story, stages, data and look).
Safer query engine (
backend/db.py)Players type arbitrary SQL into the live app. Before this PR, queries ran against one shared on-disk SQLite file with only a regex filter in front, and an unbounded recursive CTE could hang the app. Now:
database/*.sql, so nothing can leak between players,ATTACH,PRAGMA, schema changes are denied by the engine),Better player experience
no such column: nope) are shown instead of silently showing "no results". They are HTML-escaped.WITH/ CTE queries,--comments, and keywords inside string literals (e.g.'Drop Table') now work.airport=Airport).Cleanup
'bomb_id.*2' in row_strwas a literal-string check).Procfile/setup.shand duplicaterequirements-streamlit.txt; stopped disabling XSRF protection in.streamlit/config.toml.python-dateutil; bounded dependency versions.Readme.md→README.md, rewritten with the live link, sandbox design and dev instructions.Tests and CI
AppTest..github/workflows/ci.ymlrunsruff checkandpyteston Python 3.10 to 3.13.Before merging
main. The code now needs Python 3.10+; if the Streamlit Cloud app is set to an older Python, change it under the app's Settings first.streamlit runand the AppTest playthrough.Test plan
ruff check .pytest(39 passed locally on Python 3.13)Generated by Claude Code